import Vue from 'vue'
import VueRouter from 'vue-router'
import MyComp from '../views/MyComp.vue'
import EventComp from "@/views/EventComp.vue";


Vue.use(VueRouter)

const routes = [
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // },
  {
    path: '/my',
    component: MyComp
  },{
    path: "/event",
    component: EventComp
  },{
    path:"/paomadeng",
    component: () => import(/* webpackChunkName: "about" */ '../views/PaoMaDent.vue')
  },{
    path:"/model",
    component: () => import(/* webpackChunkName: "about" */ '../views/ModelTest.vue')
  }
  ,{
    path:"/calc",
    component: () => import(/* webpackChunkName: "about" */ '../views/CalcComp.vue')
  },{
    path:"/studentList",
    component: () => import(/* webpackChunkName: "about" */ '../views/StudentList.vue')
  },{
    path:"/lifeCycle",
    component: () => import(/* webpackChunkName: "about" */ '../views/LifeCycle.vue')
  },{
    path:"/axios",
    component: () => import(/* webpackChunkName: "about" */ '../views/AxiosVue.vue')
  },{
    path:"/element",
    component: () => import(/* webpackChunkName: "about" */ '../views/ElementTest.vue')
  },{
    path:"/course",
    component: () => import(/* webpackChunkName: "about" */ '../views/CourseList.vue')
  },
  {
    path:"/admin",
    component: () => import( '../layout/AdminLayout.vue'),
    children: [
      {
        path:"course",
        component: () => import(/* webpackChunkName: "about" */ '../views/CourseList.vue')
      },
      {
        path:"axios",
        component: () => import(/* webpackChunkName: "about" */ '../views/AxiosVue.vue')
      }
    ]
  }

]

const router = new VueRouter({
  mode: 'history',
  // mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
